{% extends 'template.html' %}

{% block username %}
    {{ head.username }}
{% endblock %}

{% block content %}
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Wifi申请 和 网络问题申报</h1>
                <h1 class="page-header" id="workflow_id" style="display: none;">{{ head.workflow }}</h1>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <!-- Nav tabs -->
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#wifi-apply" data-toggle="tab"><b>Wifi 申请</b></a>
                            </li>
                            <li><a href="#network" data-toggle="tab"><b>网络问题</b></a>
                            </li>
                        </ul>
                        <!-- Tab panes -->
                        <div class="tab-content">
                            <div class="tab-pane fade in active" id="wifi-apply">
                                <div class="row">
                                    <div class="col-lg-6">
                                        <div class="container">
                                            <form role="form" class="form-horizontal">
                                                <div class="form-group">
                                                    <label class="col-sm-12">申请人</label>
                                                    <div class="col-sm-6">
                                                        <select id="applicant-wifi-apply" style="width: 100%">
                                                            <option value={{ init_user.id }} selected="selected">{{ init_user.username }}</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-12">标题</label>
                                                    <div class="col-sm-6">
                                                        <input class="form-control" id="title-wifi-apply"></input>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-12">MAC地址</label>
                                                    <div class="col-sm-6">
                                                        <input class="form-control" id="mac" placeholder="请输入MAC地址，格式如：00:50:56:C0:00:08">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-12">申请理由</label>
                                                    <div class="col-sm-6">
                                                        <textarea class="form-control" id="reason-wifi-apply"></textarea>
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label class="col-sm-12">wifi名称</label>
                                                    <div class="col-sm-6">
                                                        <select id="name-wifi-apply" style="width: 100%">
                                                            <option value='0' selected="selected">Cy-Public</option>
                                                            <!--<option value='1'>Cy-mobile</option>-->
                                                            <option value='2'>Cy-work</option>
                                                        </select>

                                                    </div>
                                                    <div class="col-sm-12">
                                                        <h5 class="text-danger">Cy-work和Cy-public：需要用户的账号密码（入职的时候已发送到企业邮箱），支持多台设备登录。</h5>
                                                        <h5 class="text-danger">注意：Cy-work公司内网互通，需要提工单申请加入白名单（笔记本电脑如果输入账号密码连不上需要私聊运维网络组重置网卡）</h5>
                                                        <h5 class="text-danger">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cy-public公司内网不互通，直接用账号密码登录即可（笔记本电脑如果输入账号密码连不上需要私聊运维网络组重置网卡）</h5>
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label class="col-sm-12">流程步骤</label>
                                                    <div class="col-sm-6">
                                                        <p>{{ state_step.value }}</p>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-6">
                                                        <div class="alert alert-success col-sm-12" id="approve_user-wifi-apply"
                                                             role="alert"></div>
                                                    </div>
                                                </div>
                                                <div class="form-group" id='append_before'>
                                                    <div class="col-sm-6">
                                                        <button type="button" class="btn btn-primary" id='bt-commit-wifi-apply'>提交
                                                        </button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane fade" id="network">
                                <div class="row">
                                    <div class="col-lg-6">
                                        <div class="container">
                                            <form role="form" class="form-horizontal">
                                                <div class="form-group">
                                                    <label class="col-sm-12">申请人</label>
                                                    <div class="col-sm-6">
                                                        <select id="applicant-network" style="width: 100%">
                                                            <option value={{ init_user.id }} selected="selected">{{ init_user.username }}</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-12">标题</label>
                                                    <div class="col-sm-6">
                                                        <input class="form-control" id="title-network"/>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-12">IP地址</label>
                                                    <div class="col-sm-6">
                                                        <input class="form-control" id="ip" placeholder="请输入IP地址，格式如：192.168.1.1"/>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-12">申请理由</label>
                                                    <div class="col-sm-6">
                                                        <textarea class="form-control" id="reason-network"></textarea>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-12">流程步骤</label>
                                                    <div class="col-sm-6">
                                                        <p>{{ state_step.value }}</p>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-6">
                                                        <div class="alert alert-success col-sm-12" id="approve_user-network"
                                                             role="alert"></div>
                                                    </div>
                                                </div>
                                                <div class="form-group" id='append_before'>
                                                    <div class="col-sm-6">
                                                        <button type="button" class="btn btn-primary" id='bt-commit-network'>提交
                                                        </button>
                                                    </div>
                                                </div>
                                            </form>
                                            <hr>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block bodyjs %}
    <script src="/static/js/wifi_workflow.js?v=45ee748e4da270ed193fd78b629bec8fc9575d3"></script>
{% endblock %}
{% block css %}
{% endblock %}
